package com.prj.ufdm.demo.tutorial.despatterns.behavioral.observer;

import java.util.Vector;

public class SubjectImpl extends SubjectAbstract{

	private Vector<String> strVector = new Vector<String>();  
	
	@Override
	public void setState(String act, String str) {
        if(act.equals("ADD")) {
            strVector.add(str);
        } else if(act.equals("DEL")) {
            strVector.remove(str);
        }
        notifyObservers();
	}

	@Override
	public Vector<String> getState() {
		return strVector;
	}

}
